<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<!--新建有偿服务页面-->
<head>
<title>首页</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	<div id="content">
		<section class="content-header">
			<h1>
				<i class="fa fa-file"></i> <strong>售后服务单</strong>
			</h1>
			<ol class="breadcrumb">
				<li><a href="#"><i class="fa fa-home "></i>Home</a></li>
				<li>售后管理</li>
				<li class="active">售后服务单</li>
			</ol>
		</section>
		<!-- Main content -->
		<section class="content">
			<div class="box box-info">
				<form id="ticketForm">
					<div class="box-header with-border">
						<i class="fa fa-th-list"></i>
						<h4 class="box-title">
							新增售后服务单（ <span style="color: #F00" th:text="${ticketType}"></span>
							）
						</h4>
						<input type="hidden" id="id" name="id" /> <input type="hidden"
							id="ticketCreateTime" name="ticketCreateTime" />
					</div>
					<table class="table table-bordered">
						<tbody>
							<tr class="odd gradeX">
								<td width="10%" class="center">单位名称</td>
								<td width="40%">
									<div class="col-sm-11">
										<input class="form-control" type="text" id="unitName"
											name="unitName" datatype="*" nullmsg="请输入单位名称" />
									</div>
									<div class="col-md-1">
										<span style="color: #F00">*</span>
									</div>
								</td>
								<td width="10%" class="center">服务时间</td>
								<td width="40%">
									<div class="col-sm-11">
										<input class="form-control" type="date" id="serviceTime"
											name="serviceTime"
											th:value="${#dates.format(serviceDate,'YYYY-MM-dd')}"
											datatype="*,date" nullmsg="请输入服务时间" />
									</div>
									<div class="col-md-1">
										<span style="color: #F00">*</span>
									</div>
								</td>
							</tr>
							<tr class="even gradeC">
								<td width="10%" class="center">合同号</td>
								<td width="40%">
									<div class="col-sm-8">
										<input class="form-control" id="contractCode"
											name="contractCode" />
									</div>
									<div class="col-sm-4">
										<button type="button" class="btn btn-info btn-sm contractBtn">选择</button>
									</div>
								</td>
								<td width="10%" class="center">申请人</td>
								<td width="40%">
									<div class="col-sm-11">
										<input class="form-control" readonly="readonly" type="text"
											id="proposer" name="proposer"
											th:value="${user.empLogin.userName}" />
									</div>
								</td>
							</tr>
							<tr class="odd gradeC">
								<td width="10%" class="center">现场联系人</td>
								<td width="40%">
									<div class="col-sm-11">
										<input class="form-control" type="text" id="linkMan"
											name="linkMan" datatype="*" nullmsg="请输入联系人" />
									</div>
									<div class="col-sm-1">
										<span style="color: #F00">*</span>
									</div>
								</td>
								<td width="10%" class="center">联系方式</td>
								<td width="40%">
									<div class="col-sm-11">
										<input class="form-control" type="text" id="linkManPhone"
											name="linkManPhone" datatype="*,*1-100,t" nullmsg="请输入联系方式" />
									</div>
									<div class="col-sm-1">
										<span style="color: #F00">*</span>
									</div>
								</td>
							</tr>
							<tr class="odd gradeC">
								<td width="10%" class="center">售后类型</td>
								<td width="40%">
									<div class="col-sm-11">
										<input class="form-control" type="text" id="afterSaleType"
											name="afterSaleType" th:value="${ticketType}"
											readonly="readonly" />
									</div>
								</td>
								<td width="10%" class="center">设备编号</td>
								<td width="40%">
									<div class="col-sm-11">
										<input class="form-control" id="deviceCode" name="deviceCode" />
									</div>
								</td>
							</tr>
							<tr class="odd gradeC">
								<td width="10%" class="center">设备名称</td>
								<td width="40%">
									<div class="col-sm-8">
										<input class="form-control" type="text" id="deviceName"
											name="deviceName" />
									</div>
									<div class="col-sm-4">
										<button type="button" class="btn btn-info btn-sm deviceBtn">选择</button>
									</div>
								</td>
								<td width="10%" class="center">设备型号</td>
								<td width="40%">
									<div class="col-sm-11">
										<input class="form-control" type="text" id="deviceNumber"
											name="deviceNumber" />
									</div>
								</td>
							</tr>
							<tr class="even gradeC">
								<td width="10%" class="center">问题描述</td>
								<td colspan="3">
									<div class="col-sm-12">
										<textarea class="form-control" style="width: 100%"
											id="questionDetail" name="questionDetail" rows="3"></textarea>
									</div>
								</td>
							</tr>
							<tr class="odd gradeX">
								<td width="10%" class="center">发起部门片区</td>
								<td width="40%">
									<div class="col-sm-11">
										<input class="form-control" type="text" id="superior"
											name="superior" th:value="${user.saleArea.superiorArea}"
											readonly="readonly" />
									</div>
								</td>
								<td width="10%" class="center">提交人</td>
								<td width="40%">
									<div class="col-sm-11">
										<select
											class="form-control" id="submiter" name="submiter"
											datatype="*,*1-100,t" nullmsg="请选择提交人">
											<option></option>
											<option th:each="user:${allSuperiorMen}"
											    th:value="${user.id}"
												th:text="${user.empLogin.name}"></option>
										</select>
									</div>
									<div class="col-sm-1">
										<span style="color: #F00">*</span>
									</div>
								</td>
							</tr>
							<tr class="odd gradeC">


							</tr>
						</tbody>
					</table>
					<div class="box-header with-border">
						<i class="fa fa-th-list"></i>
						<h4 class="box-title">附件</h4>
					</div>
					<table class="table table-bordered">
						<tr class="odd gradeX">
							<td width="10%" class="center">传真，邮件</td>
							<td width="40%">
								<button type="button" class="btn btn-info upMail">上传</button>
								<button type="button" class="btn btn-info downMail">下载</button>
								<span id="mailNum" class="badge label-pill label-primary">0</span>
							</td>
							<td width="10%" class="center">质量反馈表</td>
							<td width="40%">
								<button type="button" class="btn btn-info upQuality">上传</button>
								<button type="button" class="btn btn-info downQuality">下载</button>
								<span id="qualityNum" class="badge label-pill label-primary">0</span>
							</td>
						</tr>
						<tr class="odd gradeX">
							<td width="10%" class="center">技术方案</td>
							<td width="40%">
								<button type="button" class="btn btn-info upPlan">上传</button>
								<button type="button" class="btn btn-info downPlan">下载</button>
								<span id="planNum" class="badge label-pill label-primary">0</span>
							</td>
							<td width="10%" class="center">返厂泵处理表</td>
							<td width="40%">
								<button type="button" class="btn btn-info upDealForm">上传</button>
								<button type="button" class="btn btn-info downDealForm">下载</button>
								<span id="dealFormNum" class="badge label-pill label-primary">0</span>
							</td>
						</tr>
						<tr class="odd gradeX">
							<td width="10%" class="center">其他</td>
							<td width="40%">
								<button type="button" class="btn btn-info upOther">上传</button>
								<button type="button" class="btn btn-info downOther">下载</button>
								<span id="otherNum" class="badge label-pill label-primary">0</span>
							</td>
						</tr>
					</table>
					<div>
						<a type="button" class="btn btn-default pull-right"
							href="javascript:history.go(-1)">返回</a>
						<button type="button" class="btn btn-info pull-right saveBtn">保存</button>
					</div>
				</form>
			</div>
		</section>
		<!--  关联合同弹窗           -->
		<div class="modal" id="contractModal">
			<div class="modal-dialog" role="dialog" style="width: 80%">
				<div class="modal-content">
					<form id="contractForm">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
							<h4 class="modal-title">
								<strong>合同关联</strong>
							</h4>
						</div>
						<div class="modal-body">
							<div class="box-body">
								<h5 class="modal-title">
									<strong>可关联合同信息</strong>
								</h5>
							</div>
							<div class="box box-body"
								style="width: 100%; overflow-x: scroll;">
								<div class="form-inline">
									<div class="input-group">
										<input type="text" class="form-control" id="keyword"
											placeholder="Search..." /> <span class="input-group-btn">
											<button type="button" class="btn btn-info searchBtn">查询</button>
											<button type="button" name="reset" id="reset-btn"
												class="btn btn-info resetBtn">撤消</button>
										</span>
									</div>
								</div>
								<input type="hidden" id="contractId" name="contractId" />
								<table
									class="mytable dataTable table-bordered display text-center table-striped table-hover"
									width="3500px" id="contractTable">
									<thead>
										<tr>
											<th width="4%">序号</th>
											<th width="2%">操作</th>
											<th width="4%">合同号</th>
											<th width="4%">合同类型</th>
											<!-- <th width="4%">审批状态</th> -->
											<th width="4%">所属板块</th>
											<th width="4%">总价(元)</th>
											<th width="4%">排产日期</th>
											<th width="4%">交货日期</th>
											<th width="4%">货物到站</th>
											<th width="4%">运费支付</th>
											<th width="8%">项目名称</th>
											<th width="4%">订货单位</th>
											<th width="6%">订货地址</th>
											<th width="4%">订货代表</th>
											<th width="4%">订货电话</th>
											<th width="4%">订货邮编</th>
											<th width="4%">订货片区</th>
											<th width="4%">邮寄单位</th>
											<th width="6%">邮寄地址</th>
											<th width="4%">邮寄代表</th>
											<th width="4%">邮寄电话</th>
											<th width="4%">邮寄邮编</th>
										</tr>
									</thead>
									<tbody>
									</tbody>
								</table>
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default"
								data-dismiss="modal">返回</button>
						</div>
					</form>
				</div>
			</div>
		</div>

		<!--    关联设备弹窗     	  -->
		<div class="modal" id="deviceModal">
			<div class="modal-dialog" role="dialog" style="width: 80%">
				<div class="modal-content">
					<form id="deviceForm">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
							<h4 class="modal-title">
								<strong>设备关联</strong>
							</h4>
						</div>
						<div class="modal-body">
							<div class="box-body">
								<h5 class="modal-title">
									<strong>可关联设备信息</strong>
								</h5>
							</div>
							<div class="box box-body"
								style="width: 100%; overflow-x: scroll;">
								<div class="form-inline">
									<div class="input-group">
										<input type="text" class="form-control" id="keyword"
											placeholder="Search..." /> <span class="input-group-btn">
											<button type="button" class="btn btn-info searchDevice">查询</button>
											<button type="button" name="reset" id="reset-btn"
												class="btn btn-info resetDevice">撤消</button>
										</span>
									</div>
								</div>
								<input type="hidden" id="deviceId" name="deviceId" />
								<table
									class="mytable dataTable table-bordered display text-center table-striped table-hover"
									width="3500px" id="deviceTable">
									<thead>
										<tr>
											<th width="4%">序号</th>
											<th width="2%">操作</th>
											<th width="6%">设备名称</th>
											<th width="5%">设备类型</th>
											<th width="5%">细分类型</th>
											<th width="5%">设备型号</th>
											<th width="6%">是否降库产品</th>
											<th width="5%">数量</th>
											<th width="5%">单价(元)</th>
											<th width="5%">功率(kw)</th>
											<th width="5%">过流材质</th>
											<th width="5%">传输介质</th>
											<th width="5%">粘度(Cp)</th>
											<th width="5%">流量(m3/h)</th>
											<th width="5%">扬程(m)</th>
											<th width="5%">温度(℃)</th>
											<th width="5%">比重(kg/m3)</th>
											<th width="5%">入口压力(MPa)</th>
											<th width="6%">有效气蚀余量(N[PSHa)(m)</th>
											<th width="6%">必须气蚀余量(N[PSHr)(m)</th>
										</tr>
									</thead>
									<tbody>
									</tbody>
								</table>
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default"
								data-dismiss="modal">返回</button>
						</div>
					</form>
				</div>
			</div>
		</div>

		<script th:src="@{/afterSaleTicket/ticketAdd.js}"></script>
	</div>
</body>
</html>